package com.scjp_Java6.ExceptionHandling;

/*
 * Write a class with a method that throws an exception of the type created in Exercise 2. 
 * Try compiling it without an exception specification to see what the compiler says. Add the appropriate exception specification. 
 * Try out your class and its exception inside a try-catch clause.
 */
public class TIJ_Ex_3 {

	void i_WillThrowException() throws MyException {
		 throw new MyException("baubau");
	}

	public static void main(String[] args) {
		
		try {
			new TIJ_Ex_3().i_WillThrowException();
		} catch (MyException e) {
			e.showMessage();
		}
	}
}
